-
Notifications
You must be signed in to change notification settings - Fork 9
Replace urlsplit with a new parser #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace urlsplit with a new parser #333
Conversation
6c54c51 to
4b41a7d
Compare
|
The approach you've chosen overall does the job. |
|
@olzhasar-reef I replaced the |
|
@irene-sheen-reef E.g.: b2id_pattern = re.compile(r'^b2id://(?P[a-zA-Z0-9:_-]+)$') And pick the appropriate one based on the prefix. Are there any downsides compared to the approach you've suggested? |
1b04d9d to
2c0af93
Compare
444b7eb to
5c0e518
Compare
Previously,
urllib.parse.urlsplitwas being used to parse the URL. This breaks the filename/path across path, query and fragment introducing various cases where the filename changes from the user-intended filename like:/?or#Replacing it with a simpler parser which only returns
(scheme, netloc, path)solves these issues.